package lab02.test15;

/**
 * 统计他的年收入和学费，如果收入减去学费不足2000元，
 * 则输出“You  need a loan!”（需要贷款）的信息，
 * 否则输出“You income is enough！”信息
 * Created by AIR on 2017/10/25.
 */
public class Test extends Graduate{
    public static void main(String[] args) {
        Graduate cheng = new Graduate();
        cheng.name = "zhengsan";
        cheng.age = 23;
        cheng.sex = "女";
        cheng.pay = 3000;
        cheng.fee = 2000;
        double i=cheng.getPay()-cheng.getFee();
        if(i<2000){
            System.out.println("You need a loan!");
            }
            else {
            System.out.println("You income is enough!");
        }


    }
}
